package com.lb.design.pattern.proxypattern;

import com.lb.design.pattern.proxypattern.impl.PanJinLian;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: liubin
 * Date: 2017-12-29
 * Time: 下午 2:37
 */
public class WangPo implements  KindWomen{

    private KindWomen kingWomen;

    /**
     * 王婆的默认代理是潘金莲
     */
    public WangPo(){
        this.kingWomen = new PanJinLian();
    }

    public WangPo(KindWomen kingWomen){
        this.kingWomen = kingWomen;
    }


    @Override
    public void makeSomeThingWithMan() {
        this.kingWomen.makeSomeThingWithMan();
    }

    @Override
    public void makeEyeWithMan() {
        this.kingWomen.makeEyeWithMan();
    }
}
